import java.io.FileInputStream;
import java.util.Properties;
import java.io.IOException;

public class Props {
	/**
	 * @param args
	 */
	 static String XXX;
	static final String YYY = "42";
	
	public static void main(String[] args) {
		Props p = new Props("SailTac.props");
	}

	public Props(String fileName){
		Properties props;
		props = this.loadProperties(fileName);
		System.out.println(props.getProperty("foo"));
		XXX= props.getProperty("foo");
	}

	public static Properties loadProperties(String fileName) {

		Properties props = new Properties();

		try {
			FileInputStream propsStream = new FileInputStream(fileName);
			props.load(propsStream);
			propsStream.close();
			
		} catch (IOException ioe) {
			System.out.println("I/O Exception while while loading props file");
			ioe.printStackTrace();
			System.exit(0);
		}

		return props;

	}
}
